package com.startup;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.Import;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 
 * ApplicationConfig Spring配置类
 * 
 */
/**
 * ApplicationConfig 相当于Spring的applicationContext.xml
 * 
 * @author XiaHui
 * @date 2015年12月22日 下午11:29:27
 * @version 0.0.1
 */
@Configuration
@ComponentScan(basePackages = "com.im", excludeFilters = { @ComponentScan.Filter(value = { Controller.class }) })
// @PropertySource({ "classpath:database-config.properties",
// "classpath:dp-config.properties" })
// @PropertySource({ "classpath:db/db.properties",
// "classpath:db/hibernate.properties" })
@EnableAspectJAutoProxy(proxyTargetClass = true)
@Import({ BeanConfig.class })
// 导入其他配置
@EnableTransactionManagement
public class ApplicationConfig {

	/**
	 * 任务计划工厂类配置
	 * 
	 * @return
	 */
	// @Bean
	// public SchedulerFactoryBean scheduler() {
	// SchedulerFactoryBean bean = new SchedulerFactoryBean();
	// Properties quartzProperties = new Properties();
	// quartzProperties.setProperty("org.quartz.threadPool.threadCount", "3");
	// bean.setQuartzProperties(quartzProperties);
	// return bean;
	// }

	// @Bean
	// public CronTriggerFactoryBean cronTrigger() {
	// CronTriggerFactoryBean bean=new CronTriggerFactoryBean();
	// return bean;
	// }
	//
	//
	// public MethodInvokingJobDetailFactoryBean set(){
	// MethodInvokingJobDetailFactoryBean bean=new
	// MethodInvokingJobDetailFactoryBean();
	// return bean;
	// }
	// public void set(QueueSchedule queueSchedule){
	//
	//
	// }
}